package cn.lysj.framework.store.repository;

import cn.lysj.framework.base.BaseRepository;
import cn.lysj.framework.store.domain.CustEatTable;
import cn.lysj.framework.store.vo.ShowCustEatTableVo;
import io.swagger.models.auth.In;
import org.springframework.data.jpa.repository.Query;

import java.util.Date;
import java.util.List;

/**
 * @author zwj
 * @description 用户餐桌表数据处理层
 * @create 2018-11-14 10:28:06
 **/
public interface CustEatTableRepository extends BaseRepository<CustEatTable> {

    @Query("select new cn.lysj.framework.store.vo.ShowCustEatTableVo (a.id,a.name,a.initiatorName) from CustEatTable a where a.eatTableId = ?1 and a.status = 1 and a.updateTime > ?2")
    List<ShowCustEatTableVo> findShowCustEatTableVoByEatTableId(String eatTabelId, Date updateTime);

}